package com.david.zhufengfm.entity.discoverrecommend;


import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by David on 2015/10/21.
 * qq:978944820
 */
public class ColumnsRecommend {

    /*
     "title": "听友圈子",
        "subtitle": "给你获得一种超能力的机会，你选择什么超能力？",
        "coverPath": "http://fdfs.xmcdn.com/group9/M07/1C/8C/wKgDYlV3rd2zGc9PAAAgRAu1VLU052.png",
        "contentType": "xzone",
     */

    private int id;
    private int orderNum;
    private String title;
    private String subtitle;
    private String coverPath;
    private String contentType;
    private String url;
    private String sharePic;
    private boolean enableShare;
    private int contentUpdatedAt;

    public void parseJSON(JSONObject json) throws JSONException {

        if (json != null) {
            id=json.getInt("id");
            orderNum=json.getInt("orderNum");
            title=json.getString("title");
            subtitle=json.getString("subtitle");
            coverPath=json.getString("coverPath");
            contentType=json.getString("contentType");
            url=json.getString("url");
            sharePic=json.getString("sharePic");
            enableShare=json.getBoolean("enableShare");
            contentUpdatedAt=json.getInt("contentUpdatedAt");
        }
    }

    public int getId() {
        return id;
    }

    public int getOrderNum() {
        return orderNum;
    }

    public String getTitle() {
        return title;
    }

    public String getSubtitle() {
        return subtitle;
    }

    public String getCoverPath() {
        return coverPath;
    }

    public String getContentType() {
        return contentType;
    }

    public String getUrl() {
        return url;
    }

    public String getSharePic() {
        return sharePic;
    }

    public boolean isEnableShare() {
        return enableShare;
    }

    public int getContentUpdatedAt() {
        return contentUpdatedAt;
    }
}
